//
//  DeviceStatisticTableViewCell.m
//  Rail
//
//  Created by hychen on 2018/5/13.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "DeviceStatisticTableViewCell.h"

@interface DeviceStatisticTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@end
@implementation DeviceStatisticTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self showArrowWithImage:nil];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(DeviceStatisticModel *)model {
    _model = model;
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.logo_url] placeholderImage:ImageNamed_bb(@"app_area_list_default_facility_img") options:SDWebImageAllowInvalidSSLCertificates];
    self.titleLabel.text = model.device_name;
    self.contentLabel.text = [WarnLevelConfig deviceStatusString:model.status];
    if (model.status == DeviceStatusOnline) {
        self.contentLabel.textColor = Color_RGB(0, 193, 224);
    }
    else {
        self.contentLabel.textColor = Color_RGB(86, 86, 86);
    }
}

@end
